package java8_24.chongwu;

/**
 * @author oldliu
 * @since 1.0
 */
public class PetTEst3 {
    public static void main(String[] args) {
//        Pet p=new Dog("小五花","母",90,90);
////        p.print();

        // p.catchMouse();
        Dog d2 = new Dog("小五花", "母", 90, 90);
        d2.print();
        d2.eat();
        System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>");
        Penguin p = new Penguin("小蓝企鹅", "公", 99, 99);
        p.print();
        p.eat();
        System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>");
        Pet d3 = new Dog("大黄", "公", 90, 90);
        d3.print();
        d3.eat();///!!!!!!!!!!!!!!!!只调用子类的方法
    }
}
